import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

class Test08 extends StatefulWidget {
  @override
  _Test08State createState() => _Test08State();
}

class _Test08State extends State<Test08> {
  bool check=false;
  @override
  Widget build(BuildContext context) {
    return Container(
      child: CheckboxListTile(
        controlAffinity: ListTileControlAffinity.leading,
        title: Text("测试"),
        subtitle: Text("二级标题"),
        secondary: Icon(Icons.person),
        value: check,
        onChanged: (value){
          setState(() {
            check=value;
          });
        },
      ),
    );
  }
}
